/*
 * DebugFile.java
 *
 * Created on 22 de Dezembro de 2004, 16:37
 */

package ceirinhashls;
import java.io.*;
import java.util.*;
import java.text.*;
/**
 *
 * @author  botelhodaniel
 */
public class DebugFile implements Output{
    private PrintWriter out;
    private String format = "\n<{0}> {1}";
    /** Creates a new instance of DebugFile */
    public DebugFile() throws Exception{
        out = new PrintWriter(new FileOutputStream(System.getProperty("user.dir")+java.io.File.separator+"debug.txt"));
    }
    
    public void endTask() {
    }
    
    public void endTask(String str) {
    }
    
    public void intermediateTak(String str) {
    }
    
    public void sendException(Exception e) {
        out.print(MessageFormat.format(format,new Object[]{new Date(),e.getMessage()}));
        out.flush();
    }
    
    public void startTask() {
    }
    
    public void startTask(String str) {
    }
    
    public void close() {
        out.flush();
        out.close();
    }
    
}
